package co.baiku.boot.live.baijiayun.request;

import java.util.HashMap;
import java.util.Map;

/**
 * 获取/重置partner_key
 */
public class BaiJiaCreatekeyRequest extends BaiJiaLiveRequest {

    /**
     * 合作方用于更新partner_key的密钥（由开放平台提供给合作方）
     */
    private String secretKey;
    /**
     * 为1时表示强制重新生成partner_key（默认情况下返回当前已经存在的partner_key）
     */
    private Integer regenerate;

    public BaiJiaCreatekeyRequest(String secretKey, Integer regenerate) {
        this.secretKey = secretKey;
        this.regenerate = regenerate;
    }

    @Override
    protected Map<String, Object> buildMap() {
        Map<String, Object> data = new HashMap<>(16);
        data.put("secret_key", secretKey);
        data.put("regenerate", regenerate);
        return data;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public Integer getRegenerate() {
        return regenerate;
    }

    public void setRegenerate(Integer regenerate) {
        this.regenerate = regenerate;
    }
}
